<template>
  <swiper :options="swiperOption" v-if="showSwiper">
    <swiper-slide v-for="item in listImg" :key="item.id" v-show="listImg">
      <img :src="item.pic" alt="">
    </swiper-slide>
    <swiper-slide v-for="item in dataList" :key="item.id" v-show="dataList">
      {{item.text}}
    </swiper-slide>
    <div class="swiper-pagination" slot="pagination"></div>
  </swiper>
</template>

<script type="text/ecmascript-6">
  import { swiper, swiperSlide } from 'vue-awesome-swiper'
  export default {
    data() {
      return {
        showSwiper: false
      }
    },
    props: ['swiperOption', 'listImg', 'dataList'],
    components: {
      swiper,
      swiperSlide
    }
  }
</script>

<style>
  .swiper-slide img{
    width: 100%;
  }
  .recommend .swiper-pagination-bullet{
    background: #ccc;
  }
  .recommend .swiper-pagination-bullet-active {
    background: #C20C0C;
  }
</style>
